package com.jinmei.web.action;


import org.apache.struts2.json.annotations.JSON;

import com.jinmei.service.JPushAliasService;
import com.jinmei.utils.StringUtil;

public class JPushAliasAction extends BaseAction {

	private static final long serialVersionUID = -3281800666521841836L;

	private JPushAliasService jPushAliasService;
	private String userid;
	
	// json result
	private String alias;

	public String execute() throws Exception {
		String alias = getjPushAliasService().getAliasByEmployee(
				StringUtil.convertString2Long(getUserid()));
		setAlias(alias);
		
		return SUCCESS;
      
	}  

	public String getUserid() {
		return userid;
	}

	public void setUserid(String userid) {
		this.userid = userid;
	}

	@JSON (name="alias")
	public String getAlias() {
		return alias;
	}

	public void setAlias(String alias) {
		this.alias = alias;
	}

	public JPushAliasService getjPushAliasService() {
		return jPushAliasService;
	}

	public void setjPushAliasService(JPushAliasService jPushAliasService) {
		this.jPushAliasService = jPushAliasService;
	}

}
